-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port to current bats-core
#11
Open
rico-chet
wants to merge
15
commits into
ztombol:master
Choose a base branch
from
rico-chet:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add line breaks and split the long installation statement.
Use a specific `bats` version instead of the moving `master` branch. Set the version to v0.4.0 which is the latest release.
Since the original `bats` isn't maintained anymore, switch to its successor `bats-core`.
Merge pull request #2 from rico-chet/switch-to-bats-core
Cloning was done using the `v*` pattern which works for tags only. In future, we will need to clone a branch, too. Extend the mechanism to branches by removing the leading `v`.
In the `fixtures()` function, a `bats`-internal function is used, namely `bats_trim_filename()`. With the commit eaa151fb "exec-test: Use printf -v in bats_trim_filename" (bats-core/bats-core@eaa151f) introduced in `bats` v1.0.0, its interface was changed to take a variable name instead of printing to `stdout`, breaking the test code. Adapt to the incompatible change, retaining compatibility with v0.* versions. Expect all tests to pass now.
To make use of the newest `bats-core` features, update the version. Since a couple hurdles will occur, do it step-wise.
To make use of the newest `bats-core` features, update the version. Since a couple hurdles will occur, do it step-wise.
To make use of the newest `bats-core` features, update the version. Since a couple hurdles will occur, do it step-wise.
In an upcoming commit, we will test with different `bats` versions in parallel, prepare for this by declaring a separate `v0.4.0` build environment.
To make use of the newest `bats-core` features, update the version. Since a couple hurdles will occur, do it step-wise. With v1.0.0, all tests fail, so expect them to fail. This will be fixed in an upcoming commit.
Merge pull request #4 from rico-chet/update-bats-core
To make use of the newest `bats-core` features, update the version, ultimately. Two tests fail, so expect them to. This will be fixed in an upcoming commit.
Since commit 17e2cf35 "*: refactor to always use bats-exec-suite" (bats-core/bats-core@17e2cf35), `*.bats` files without a test aren't run at all. This leads to two checks not working properly. Add _void_ tests to the affected files and adapt the tests to take into account the extra line that is emitted.
Merge pull request #5 from rico-chet/update-bats-core-to-master
This was referenced Apr 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original
bats
repository is abandoned (no commits for years), the successor beingbats-core
. Over years, its development progressed, yetbats-file
didn't follow, so now tests are failing due to a couple internal changes.Luckily, fixing the tests is all that's needed, business logic isn't affected by the dependency upgrade.
To ensure backward compatibility to the old
bats
, additionaltravis
environments were added so that a bunch ofbats-core
versions are tested at once, v0.4.0 being same as the latestbats
release and the oldest version to be supported.